from selenium.webdriver.common.by import By

from base import Base
class Page(Base):
     def find_djssl(self):
         loc=(By.XPATH,'//android.widget.TextView[@text="搜索菜谱"]')
         ele=self.wingwei(loc)
         return ele
     def shuru(self):
         loc=(By.CLASS_NAME,'android.widget.EditText')
         ele=self.wingwei(loc)
         return ele
     def anniu(self):
         loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索")')
         ele=self.wingwei(loc)
         return ele
     def jinru(self):
         loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.xiachufang:id/common_photo_image_view"])[1]')
         ele=self.wingwei(loc)
         return ele
     def wenzi(self):
         loc=(By.ID,'com.xiachufang:id/recipe_name')
         ele=self.dingweiwenzi(loc)
         return ele
     def jieetu(self):
         self.jietu('tu.png')
     def dingweii(self):
         loc=(By.XPATH,'//android.widget.TextView[@text="搜索"]')
         self.wenzi(loc)